/**
 * Created by Administrator on 2017/1/21.
 */

var MJ = require('../MJ/MJ');

exports.HSZStatus = {
    'NONE': 0,
    'FINISHED': 1,
}

var ScoreRule = clone(MJ.ScoreRule);
//'ZM': 2,                  // 自摸加分
//'GSH': 101,               // 杠上花   ，作用于胡牌玩家
//'GSP': 102,               // 杠上炮   ，作用于点炮玩家
//'QG': 103,                // 抢杠     ，作用于杠牌玩家
//'TH': 105,                // 天胡     ，作用于胡牌玩家
//'DIHU': 107,              // 地胡     ，作用于胡牌玩家
ScoreRule.SINGLE = 207;     // 金钩胡
ScoreRule.SaoDiHu = 208;    // 扫底胡
ScoreRule.HaiDiHu = 209;    // 海底胡
ScoreRule.HaiDiHua = 210;   // 海底花
//ScoreRule.MenQing = 211;    // 门清
//ScoreRule.ZhongZhang = 212; // 中张
ScoreRule.JiaXinWu = 213;   // 夹心五
ScoreRule.YiTiaoLong = 214; // 一条龙


var Pattern = {
    'NONE': 0,                // 不是可胡的牌型
    'NORMAL': 1,              // 平胡
    'PAIR': 2,                // 对对胡
    'PAIR7': 3,               // 七对

    'NORMAL_COLOR': 15,      // 清一色

    'PAIR_COLOR': 25,        // 清对

    'PAIR7_LONG': 32,       // 龙七对
    'PAIR7_COLOR': 35,      // 清七对
    'PAIR7_COLOR_LONG': 37,// 清龙对

    'DaiYaoJiu': 201,           // 全幺九
    'JiangDui': 202,            // 将对
    'JiangDui7': 203,           // 将七对

    'MenQing': 211,             // 门清
    'ZhongZhang': 212,          // 中张
};

var PatternScore = {}
PatternScore[Pattern.NORMAL] = 0;
PatternScore[Pattern.PAIR] = 1;
PatternScore[Pattern.PAIR7] = 2;
PatternScore[Pattern.NORMAL_COLOR] = 2;
PatternScore[Pattern.PAIR_COLOR] = 3;
PatternScore[Pattern.PAIR7_LONG] = 3;
PatternScore[Pattern.PAIR7_COLOR] = 4;
PatternScore[Pattern.PAIR7_COLOR_LONG] = 5;

PatternScore[Pattern.DaiYaoJiu] = 3;
PatternScore[Pattern.JiangDui] = 3;
PatternScore[Pattern.JiangDui7] = 4;

PatternScore[Pattern.MenQing] = 1;
PatternScore[Pattern.ZhongZhang] = 1;

var ItemScore = {};
ItemScore[ScoreRule.ZM] = 0;
ItemScore[ScoreRule.GSH] = 1;
ItemScore[ScoreRule.GSP] = 1;
ItemScore[ScoreRule.QG] = 1;
ItemScore[ScoreRule.TH] = 3;
ItemScore[ScoreRule.DIHU] = 2;
ItemScore[ScoreRule.SINGLE] = 1;
ItemScore[ScoreRule.SaoDiHu] = 1;
ItemScore[ScoreRule.HaiDiHu] = 1;
ItemScore[ScoreRule.HaiDiHua] = 1;
//ItemScore[ScoreRule.MenQing] = 1;
//ItemScore[ScoreRule.ZhongZhang] = 1;
ItemScore[ScoreRule.JiaXinWu] = 1;
ItemScore[ScoreRule.YiTiaoLong] = 1;

var ScoreReason = {
    PT: 10,             // 陪听/查叫
};

var GangScore = {};
GangScore[MJ.Gang.BA] = 1;
GangScore[MJ.Gang.AN] = 2;
GangScore[MJ.Gang.DIAN] = 2;
GangScore[MJ.Gang.ANS] = 2;

exports.ScoreRule = ScoreRule;
exports.Pattern = Pattern;
exports.PatternScore = PatternScore;
exports.ItemScore = ItemScore;
exports.ScoreReason = ScoreReason;
exports.GangScore = GangScore;